<!-- 查询排课 Modal -->
<div class="modal fade" id="searchModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><i class="bi bi-search me-2"></i>查询排课</h5>
                <span id="searchDelMsg" class="text-danger ms-3" style="display:none;font-size:0.9rem;"></span>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <div class="modal-body">
                <!-- 搜索条件 -->
                <div id="search-panel" class="mb-3">
                    <div class="row g-2">
                        <div class="col-sm-3">
                            <label>开始日期</label>
                            <input type="date" id="search-start-date" class="form-control form-control-sm" required>
                        </div>
                        <div class="col-sm-3">
                            <label>结束日期</label>
                            <input type="date" id="search-end-date" class="form-control form-control-sm">
                        </div>
                        <div class="col-sm-3">
                            <label>开始时间</label>
                            <input type="time" id="search-start-time" class="form-control form-control-sm">
                        </div>
                        <div class="col-sm-3">
                            <label>结束时间</label>
                            <input type="time" id="search-end-time" class="form-control form-control-sm">
                        </div>
                        <div class="col-12">
                            <label>关键字（空格分隔）</label>
                            <input type="text" id="search-keywords" class="form-control form-control-sm"
                                   placeholder="姓名、课程等">
                        </div>
                        <div class="col-12 text-end">
                            <button id="do-search" class="btn btn-primary btn-sm">搜索</button>
                        </div>
                    </div>
                </div>

                <div class="mb-2 text-center">
                    <button id="back-to-search" class="btn btn-light btn-sm rounded-circle p-1" title="切换搜索条件">
                        <i class="bi bi-chevron-up"></i>
                    </button>
                </div>
                <!-- 批量删除按钮 -->
                <div id="batch-delete-container" class="mb-2" style="display:none;">
                    <button id="batch-delete" class="btn btn-danger btn-sm">批量删除</button>
                </div>
                <!-- 结果列表 -->
                <div id="search-results" style="max-height:300px; overflow-y:auto;">
                    <table class="table table-sm text-center mb-0">
                        <thead>
                        <tr>
                            <th><input type="checkbox" id="select-all"></th>
                            <th>日期（星期）</th>
                            <th>时间</th>
                            <th>学生姓名</th>
                        </tr>
                        </thead>
                        <tbody id="results-body"></tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
